<template>
    <Teleport to="body">
        <transition name="el-fade-in">
            <div
                class="notice-tips-dialog"
                v-if="dialogStore.isNoticeTipsDialogVisible"
            >
                <div class="notice-tips-dialog__mask" @click="onClose"></div>
                <div class="notice-tips-dialog__content">
                    <div class="notice-tips-dialog__title">消息通知</div>
                    展厅作品增加展厅文字介绍功能，快来增加你的展厅介绍吧（展厅介绍文字目前支持移动端查看，电脑端在更新中，会尽快上线，烦请大家耐心等待）,
                    <span class="link" @click="jumpUrl('/admin/works.html')">
                        点击跳转到作品管理
                    </span>

                    <div class="btn-footer">
                        <el-button type="primary" @click="onClose">
                            关闭
                        </el-button>
                    </div>
                </div>
            </div>
        </transition>
    </Teleport>
</template>
<script setup>
const dialogStore = useDialogStore();

const onClose = () => {
    dialogStore.isNoticeTipsDialogVisible = false;
};

const jumpUrl = (url) => {
    navigateTo(url);
    onClose();
};
</script>
<style lang="scss" scoped>
.notice-tips-dialog {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;

    &__mask {
        position: relative;
        width: 100%;
        height: 100%;
        background-color: rgba($color: #000000, $alpha: 0.5);
    }

    &__content {
        position: absolute;
        top: 30%;
        left: 50%;
        width: 499px;
        height: 300px;
        transform: translate(-50%, -50%);
        font-size: 16px;
        line-height: 26px;
        padding: 0 47px;
        background-image: url("https://yzpt-resources.oss-cn-hangzhou.aliyuncs.com/web/images/notice-tips-bg.png");
        background-size: 100% 100%;

        .link {
            text-decoration: none;
            color: #5085fb;
            cursor: pointer;
            line-height: 30px;
        }
    }

    &__title {
        text-align: center;
        font-size: 24px;
        font-weight: 500;
        margin-top: 36px;
        margin-bottom: 44px;
        color: #000;
        line-height: 6px;
    }

    .btn-footer {
        text-align: center;
        margin-top: 30px;

        :deep(.el-button--primary) {
            padding: 8px 25px;
            border-radius: 20px;
        }
    }
}
</style>
